KERNEL_DIR = /lib/modules/$(shell uname -r)/build
PROJECT_DIR = $(shell pwd)

VBUS_OBJ_FILES = vbus.o
VDRIVER_OBJ_FILES = vdriver.o
VDEVICE_OBJ_FILES = vdevice.o

obj-m :=v_bus.o v_driver.o v_device.o

v_bus-objs := $(VBUS_OBJ_FILES)
v_driver-objs := $(VDRIVER_OBJ_FILES)
v_device-objs := $(VDEVICE_OBJ_FILES)

all:
	$(MAKE) -C $(KERNEL_DIR) M=$(PROJECT_DIR) modules
clean:
	$(MAKE) -C $(KERNEL_DIR) M=$(PROJECT_DIR) clean
